package com.imooc.sell.VO.tian.newUtil;

/**
 * @ClassName ResultUtil
 * @Description TODO
 * @Author tianli
 * @Date 2018/8/14
 **/
public class ResultUtil {
    public static ResultVo success(Object o) {
        ResultVo resultVo = new ResultVo();
        resultVo.setMcode(1);
        resultVo.setMsg("成功");
        resultVo.setData(o);
        return resultVo;
    }

    public static ResultVo success() {
        return null;
    }

    public static ResultVo error(Integer code, String msg) {

        ResultVo resultVo = new ResultVo();
        resultVo.setMsg(msg);
        resultVo.setMcode(code);
        return resultVo;
    }
}
